var assert         = require('assert'),
    utility        = require('system/utility'),
	SecuredObject  = require('security/securedObject'),
    AuditableTests = require('../system/auditable.Tests');

SecuredObjectTests = (function () {
	var SecuredObjectTests = function() {
		var tests = {};

		utility.extend(
			true,
			tests,
			AuditableTests(),
			{
				'#type': {
					'type should be read only' : function() {
						var settings = { name : 'test', type: 'asfd' },
						    auditable = new SecuredObject(settings);

						settings.type  = 'qwerty';
						auditable.type = 'fdsa';
					
						assert.equal(auditable.type, 'asfd');
					}
				}
				
			}
		);

		return tests;
	};

	return SecuredObjectTests;
})();

// Hook into commonJS module systems
if (typeof module !== 'undefined' && "exports" in module) {
  module.exports = SecuredObjectTests;
}